{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Interactive Matching System\n", "This example illustrate a matching system made of an open stub in series with a delay load. The length of both transmission lines can be tuned, with a direct view of the resulting Smith chart. " ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%matplotlib inline\n", "\n", "import matplotlib.pyplot as plt\n", "from ipywidgets import interact\n", "\n", "import skrf as rf\n", "from skrf.frequency import Frequency\n", "from skrf.media import DistributedCircuit\n", "\n", "rf.stylely()\n", "# define a frequency object\n", "freq = Frequency(0.01, 10, 201, 'GHz')\n", "\n", "# create a Media object for RG-58, based on distributed ckt values\n", "rg58 = DistributedCircuit(frequency = freq,\n", " C =93.5e-12,#F/m\n", " I =273e-9, #H/m\n", " R =0,#53e-3, #Ohm/m\n", " G =0, #S/m\n", " z0_port = 50\n", " )\n", "\n", "\n", "load = rg58.load(.5)\n", "def func(d1=180, d2=180):\n", " l1 = rg58.line(d=d1, unit='deg')\n", " l2 = rg58.shunt_delay_open(d=d2, unit='deg')\n", " ntwk = l2**l1**load\n", " ntwk.plot_s_smith(0,0)\n", " plt.draw()\n", " plt.show()\n", "\n", "a=interact(func, d1= (0,360,10),d2= (0,360,10),embed=True);" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "anaconda-cloud": {}, "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.10" } }, "nbformat": 4, "nbformat_minor": 4 }